//
//  YZClient+Account.h
//  YZMicroStock
//
//  Created by Lv.Dongdong on 16/4/5.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "YZNetworkManager.h"

@interface YZNetworkManager (Account)

/**
*  登录
*
*  @param username 用户名
*  @param password 密码
*  @param success  成功回调
*  @param failure  失败回调
*/
- (void)loginForUsername: (NSString *)username
                password: (NSString *)password
                 success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                 failure: (void (^)(NSError *error))failure;

/**
 *  注册第一步 验证手机是否注册
 *
 *  @param mobile  手机号
 *  @param success  成功回调
 *  @param failure  失败回调
 */
- (void)sendSmsWithMobile: (NSString *)mobile
                  success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                  failure: (void (^)(NSError *error))failure;

/**
 *  注册第二步 获取验证码
 *
 *  @param mobile  手机号
 *  @param success  成功回调
 *  @param failure  失败回调
 */
- (void)getMobileAuthCode:(NSString *)mobile withCheckCode:(NSString *)code
                  success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                  failure:(void (^)(NSError *error))failure;


- (void)getMobileAuthCode:(NSString *)mobile
                  success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                  failure:(void (^)(NSError *error))failure;



/**
 *  注册第三步 验证手机号与验证码是否ok
 *
 *  @param mobile  手机号
 *  @param code    验证码
 *  @param success  成功回调
 *  @param failure  失败回调
 */
- (void)registerGoNextStepWithMobile:(NSString *)mobile withCheckCode:(NSString *)code
                             Success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                             failure:(void (^)(NSError *error))failure;

/**
 *  注册第三步 注册
 *
 *  @param mobile   手机号
 *  @param smsCode  验证码
 *  @param username 用户名
 *  @param password 密码
 *  @param success  成功回调
 *  @param failure  失败回调
 */
- (void)registerWithMobile: (NSString *)mobile
                   smsCode: (NSString *)smsCode
                  username: (NSString *)username
                  password: (NSString *)password
                   success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                   failure: (void (^)(NSError *error))failure;

/**
 *  忘记密码第一步 获取验证码
 *
 *  @param mobile  手机号
 *  @param success  成功回调
 *  @param failure  失败回调
 */
- (void)forget_getMobileAuthCode:(NSString *)mobile withCheckCode:(NSString *)code
                         success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                         failure:(void (^)(NSError *error))failure;

- (void)forget_getMobileAuthCode:(NSString *)mobile
                  success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                  failure:(void (^)(NSError *error))failure;

/**
 *  忘记密码第二步 密码重设
 *
 *  @param mobile  手机号
 *  @param pwd     密码
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)forget_resetPwdWithMobile: (NSString *)mobile andPwd: (NSString *)pwd andCheckCode:(NSString *)checkCode
                          success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                          failure: (void (^)(NSError *error))failure;

/**
 *  心跳检测
 *
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)keepAliveSuccess:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                 failure: (void (^)(NSError *error))failure;

/**
 *  用户余额
 *
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)fetchUserAssetsSuccess:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                       failure: (void (^)(NSError *error))failure;

/**
 *  用户信息
 *
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)fetchUserDetailSuccess:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                       failure: (void (^)(NSError *error))failure;

/**
 *  修改登录密码
 *
 *  @param oldPwd  旧密码
 *  @param pwd     新密码
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)resetLoginPwdWithOldPwd: (NSString *)oldPwd andNewPwd: (NSString *)newPwd
                          success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                          failure: (void (^)(NSError *error))failure;

/**
 *  设置提现密码
 *
 *  @param pwd     密码
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)setDrawPwdWithPwd:(NSString *)pwd
                  success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                  failure: (void (^)(NSError *error))failure;
/**
 *  实名认证
 *
 *  @param name    姓名
 *  @param idCard  身份证号
 *  @param success
 *  @param failure 
 */
- (void)at_updateRealName:(NSString *)name andIDCard:(NSString *)idCard success:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;

/**
 *  身份证实名认证
 *
 *  @param name        姓名
 *  @param idCard      身份证号
 *  @param frontData   身份证正面照
 *  @param backData    身份证反面照
 *  @param profileData 手持身份证照
 *  @param success
 *  @param failure
 */
- (void)at_verifyIdentifyWithRealName:(NSString *)name andIDCard:(NSString *)idCard andFrontData:(NSData *)frontData andBackData:(NSData *)backData andProfileData:(NSData *)profileData success:(void (^)(NSURLResponse *response,id responseObject))success failure: (void (^)(NSError *error))failure;

/**
 *  修改提现密码
 *
 *  @param oldPwd  旧密码
 *  @param newPwd  新密码
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)changeWithdrawPwdWithOldPwd: (NSString *)oldPwd andNewPwd: (NSString *)newPwd
                        success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                        failure: (void (^)(NSError *error))failure;

/**
 *  发送提现验证码
 *
 *  @param voice   是否是语音发送
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)forget_getAuthCodeWithVoice:(BOOL)voice
                          success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                          failure: (void (^)(NSError *error))failure;

/**
 *  重置提现密码
 *
 *  @param pwd       密码
 *  @param checkCode 验证码
 *  @param success   成功回调
 *  @param failure   失败回调
 */
- (void)forget_resetWithdrawPwdWithPwd:(NSString *)pwd andCheckCode:(NSString *)checkCode
                          success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                          failure: (void (^)(NSError *error))failure;

/**
 *  公告列表
 *
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)fetchNoticeListSuccess:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                       failure: (void (^)(NSError *error))failure;


/**
 *  登出
 *
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)logoutSuccess:(void (^)(NSURLSessionDataTask *task,id responseObject))success
              failure: (void (^)(NSError *error))failure;


/**
 *  我的策略组
 *
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)getmystategy:(void (^)(NSURLSessionDataTask *task,id responseObject))success
              failure: (void (^)(NSError *error))failure;

/**
 支付宝认证
 
 @param payZFAccount 账号
 @param tradeNo 订单号
 @param tradeAmount 充值金额
 @param success
 @param failure
 */
- (void)payZFAuthWithpayZFAccount:(NSString *)payZFAccount withTradeNo:(NSString *)tradeNo withTradeAmount:(NSString *)tradeAmount
                            Success:(void (^)(NSURLSessionDataTask *task,id responseObject))success
                            failure:(void (^)(NSError *error))failure;

@end;
